import request from "@/utils/request"
// 查询列表
export function imgGetList(data) {
  return request({
    url: "/v1/assignment/images-assignment-task/list",
    method: "POST",
    data,
  });
}

// 图片任务状态统计
export function getTaskStatistics(data) {
  return request({
    url: "/v1/assignment/images-assignment-task/task-statistics",
    method: "POST",
    data,
  });
}

// 图片日志
export const queryLogList = (data) => {
  return request({
    url: `/v1/assignment/images-assignment-base/get-log`,
    method: "POST",
    data
  });
};

// 商品SPU列表(新增任务，选择产品)
export function querySpuList(data) {
  return request({
    url: "/v1/goods/spu/product-list",
    method: "POST",
    data,
  });
}

// 商品SKU列表
export function querySkuList(data) {
  return request({
    url: "/v1/goods/sku/list",
    method: "POST",
    data,
  });
}

// 新增图片任务
export function imageSave(data) {
  return request({
    url: "/assignment/images/save",
    method: "POST",
    data,
  });
}

// 修改图片任务
export function imageUpdate(data) {
  return request({
    url: "/assignment/images/update",
    method: "POST",
    data,
  });
}

// 批量审核
export function submitAudit(data) {
  return request({
    url: "/v1/assignment/images-assignment-base/batch-review",
    method: "POST",
    data,
  });
}

// 分配人员
export function batchAssignment(data) {
  return request({
    url: "/assignment/batch-assignment",
    method: "POST",
    data,
  });
}

// 提交审核
export function submitReview(data) {
  return request({
    url: "/assignment/images/submit-review",
    method: "POST",
    data,
  });
}

// 取消任务
export function cancelTask(data) {
  return request({
    url: "/assignment/images/cancel-task",
    method: "POST",
    data,
  });
}

// 上传编辑文案
export function uploadCopywriting(data) {
  return request({
    url: "/assignment/images/upload-copywriting",
    method: "POST",
    data,
  });
}

// 获取商品详情
export function getImagesDetail({ id }) {
  return request({
    url: `/assignment/images/get-detail?id=${id}`,
    method: "get",
  });
}

// 查看图片
export function getDetgetImagesail(data) {
  return request({
    url: `/v1/assignment/images-assignment-task/get-images`,
    method: "POST",
    data
  });
}

// 获取状态下拉
export function getOptions() {
  return request({
    url: `/assignment/images/get-options`,
    method: "get",
  });
}

// 获取产品分类状态下拉
export function classificationGetList() {
  return request({
    url: `/base/backend-classification/get-list`,
    method: "get",
  });
}

// 查询条件列表
export function queryConditionList(data) {
  return request({
    url: '/v1/goods/condition/list',
    method: 'POST',
    data
  })
}

// 批量打标签
export function batchMarkTag(data) {
  return request({
    url: '/v1/assignment/images-assignment-task/mark-tag-rule-type',
    method: 'POST',
    data
  })
}

// 批量设置分配时间
export function batchSetTime(data) {
  return request({
    url: '/v1/assignment/images-assignment-task/batch-set-assignment-time',
    method: 'POST',
    data
  })
}

// 批量设置绩效月份
export function batchSetPerformanceMonth(data) {
  return request({
    url: '/v1/assignment/images-assignment-task/batch-set-performance-month',
    method: 'POST',
    data
  })
}

// 批量设置任务要求
export function batchSetTask(data) {
  return request({
    url: '/v1/assignment/images-assignment-task/batch-set-task-requirements',
    method: 'POST',
    data
  })
}

// 设置自定义字段
export function setCustomFields(data) {
  return request({
    url: '/base/set-custom-fields',
    method: 'POST',
    data
  })
}

// 获取自定义字段
export function getCustomFields(data) {
  return request({
    url: '/base/get-custom-fields',
    method: 'POST',
    data
  })
}

// 检测sku是否在一个月内创建过任务
export function skuIsCreate(data) {
  return request({
    url: '/v1/assignment/images-assignment-task/sku-is-create',
    method: 'POST',
    data
  })
}


// 创建图片任务
export function createImagesAssignment(data) {
  return request({
    url: '/v1/assignment/images-assignment-task/create',
    method: 'POST',
    data
  })
}

// 修改图片任务
export function editImagesAssignment(data) {
  return request({
    url: '/v1/assignment/images-assignment-task/edit',
    method: 'POST',
    data
  })
}

// 图片任务详情
export function getImagesAssignmentDetail(data) {
  return request({
    url: '/v1/assignment/images-assignment-task/detail',
    method: 'POST',
    data
  })
}

// 批量分配人员
export function batchaAssignment(data) {
  return request({
    url: '/v1/assignment/images-assignment-task/batch-assignment',
    method: 'POST',
    data
  })
}

// 运营审核记录
export function operateReviewRecord(data) {
  return request({
    url: '/v1/assignment/images-assignment-task/operate-review-record',
    method: 'POST',
    data
  })
}

// 批量设计审核
export function batchDesignReview(data) {
  return request({
    url: '/v1/assignment/images-assignment-task/batch-design-review',
    method: 'POST',
    data
  })
}

// 批量运营审核
export function batchOperateReview(data) {
  return request({
    url: '/v1/assignment/images-assignment-task/batch-operate-review',
    method: 'POST',
    data
  })
}

// 批量设置超额任务
export function setExceed(data) {
  return request({
    url: '/v1/assignment/images-assignment-task/set-exceed',
    method: 'POST',
    data
  })
}

// 编辑绩效-详情数据
export function getReportDetail(params) {
  return request({
    url: '/v1/assignment/images-assignment-task/report-detail',
    method: 'GET',
    params
  })
}

// 重新编辑绩效-保存
export function saveReport(data) {
  return request({
    url: '/v1/assignment/images-assignment-task/re-edit-tag',
    method: 'POST',
    data
  })
}

// 非设计任务列表
export function getNotDesignList(data) {
  return request({
    url: '/v1/assignment/images-assignment-task/not-design-list',
    method: 'POST',
    data
  })
}

// 创建非设计任务
export function createNotDesign(data) {
  return request({
    url: '/v1/assignment/images-assignment-task/create-not-design',
    method: 'POST',
    data
  })
}

// 编辑非设计任务
export function editNotDesign(data) {
  return request({
    url: '/v1/assignment/images-assignment-task/edit-not-design',
    method: 'POST',
    data
  })
}

// 列表头部字段统计
export function taskListStatistics(data) {
  return request({
    url: '/v1/assignment/images-assignment-task/task-list-statistics',
    method: 'POST',
    data
  })
}

// 列表头部字段统计
export function notDesignStatistics(data) {
  return request({
    url: '/v1/assignment/images-assignment-task/not-design-statistics',
    method: 'POST',
    data
  })
}

// 任务标签设置系数
export function getTaskTagList(data) {
  return request({
    url: '/v1/report/design/task-tag-list',
    method: 'POST',
    data
  })
}

// ============================= 任务进度看板（环境电子）=============================
// 环境电子列表用户
export function getDataboardUserList(data) {
  return request({
    url: '/v1/assignment/images-databoard/user-list',
    method: 'POST',
    data
  })
}

// 环境电子列表
export function getDataboardElectronicList(data) {
  return request({
    url: '/v1/assignment/images-databoard/electronic-list',
    method: 'POST',
    data
  })
}

// 更新任务字段
export function editTaskInfo(data) {
  return request({
    url: '/v1/assignment/images-databoard/edit-task-info',
    method: 'POST',
    data
  })
}

// 环境电子排序
export function eletronicSort(data) {
  return request({
    url: '/v1/assignment/images-databoard/eletronic-sort',
    method: 'POST',
    data
  })
}

// 更新用户维度数据
export function userTaskInfo(data) {
  return request({
    url: '/v1/assignment/images-databoard/user-task-info',
    method: 'POST',
    data
  })
}

// 任务安排列表
export function getTaskScheduleList(data) {
  return request({
    url: '/v1/assignment/images-databoard/task-schedule-list',
    method: 'POST',
    data
  })
}

// 保存部门分配周期
export function scheduleSave(data) {
  return request({
    url: '/v1/assignment/images-databoard/schedule-save',
    method: 'POST',
    data
  })
}

// 任务认领
export function imagesAssignmentClaimTask(data) {
  return request({
    url: '/v1/assignment/images-assignment-task/claim-task',
    method: 'POST',
    data
  })
}

// ============================= 任务进度看板（海外仓）=============================
// 海外仓看板列表
export function getDataboardList(data) {
  return request({
    url: '/v1/assignment/images-databoard/databoard',
    method: 'POST',
    data
  })
}


